package com.library.dao;

import com.library.entity.BookReview;
import java.util.List;

public interface BookReviewDao {
    // 添加评价
    int addReview(BookReview review);

    // 获取图书的所有评价
    List<BookReview> getBookReviews(Long bookId);

    // 获取图书的平均评分
    double getAverageRating(Long bookId);

    // 删除评价
    int deleteReview(Long reviewId);

    // 检查用户是否已经评价过该书
    boolean hasUserReviewed(Long bookId, Long readerId);
}